package io.qar.feign;

import io.qar.commons.tools.constant.ServiceConstant;
import io.qar.commons.tools.utils.Result;
import io.qar.feign.fallback.BackCalculateFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;

/**
 * 执行回算任务
 */
@FeignClient(name = ServiceConstant.qar_ADMIN_SERVER, contextId = "BackCalculateFeignClient", fallbackFactory = BackCalculateFeignClientFallbackFactory.class)
public interface BackCalculateFeignClient {

    /**
     * 执行回算任务
     */
    @PostMapping("sys/backcalculate/execute")
    Result<String> execute(@RequestBody Map<String, Object> params);

}